package com.bristua.mall.user.controller;

import com.bristua.mall.common.bean.Result;
import com.bristua.mall.common.utils.HandleResultUtil;
import com.bristua.mall.user.biz.UserRegBiz;
import com.bristua.mall.user.model.condition.userReg.UserReg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/3/30.
 */
@RestController
@Api(value="用户注册",tags={"用户注册"})
public class UserRegController {

    @Autowired
    private UserRegBiz userRegBiz;
    @ApiOperation(value="用户注册")
    @PostMapping(value="/api/user/reg")
    public Result userReg(@RequestBody UserReg userReg){
        userRegBiz.userReg(userReg);
        return HandleResultUtil.addSuccessResult();
    }
}
